import Vue from 'vue'

import VueRouter from 'vue-router'
Vue.use(VueRouter)

import app from './App.vue'

import moment from 'moment'

// 导入bootstrap
import './lib/css/bootstrap.min.css'

// 导入jquery
import './lib/js/jquery.min'

// 导入element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);


// 导入 vue-preview
import VuePreview from 'vue-preview'
Vue.use(VuePreview)

Vue.filter('dateFormat', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
    return moment(dataStr).format(pattern)
})

// 导入轮播图
import { Swipe, SwipeItem } from 'mint-ui';
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);

// 导入axios
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios)
axios.defaults.baseURL = "http://127.0.0.1:8888";


import router from './router.js'

new Vue({
    el: '#app',
    render: c => c(app),
    router,
})
